home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (C) 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- /////////////////////////////////////////////////////////////
- //
- // Source file for DrcmapControl
- //
- // This file generated by a BuilderXcessory. DO NOT EDIT THIS FILE.
- // TO ADD EXTENSIONS TO THIS CLASS, USE THE BUILDER XCESSORY
- // TO CREATE A SUBCLASS.
- //
- // This class is a user interface "component", as described
- // in "Object-Oriented Programming with C++ and OSF/Motif",
- // by Douglas Young, Prentice Hall, 1992. ISBN 0-13-630252-1
- //
- //
- /////////////////////////////////////////////////////////////
-
-
- #include "DrcmapControl.h" // Generated header file for this class
- #include <Xm/BulletinB.h>
- #include <Xm/Frame.h>
- #include <Xm/Label.h>
- #include <Xm/List.h>
- #include <Xm/PushB.h>
- #include <Xm/ScrolledW.h>
- #ifndef XmNrow
- #define XmNrow "row"
- #endif
- #ifndef XmNcolumn
- #define XmNcolumn "column"
- #endif
- // Externally defined classes referenced by this class ;
-
- #include "DrawwinDerived.h"
- #include "DrcmapControlDerived.h"
-
-
-
-
-
-
-
- // These are default resources for widgets in objects of this class
- // All resources will be prepended by *<name> at instantiation,
- // where <name> is the name of the specific instance, as well as the
- // name of the baseWidget. These are only defaults, and may be overriden
- // in a resource file by providing a more specific resource name
-
- String DrcmapControl::_defaultDrcmapControlResources[] = {
- NULL
- };
-
- DrcmapControl::DrcmapControl(const char *name, Widget parent) :
- VkComponent(name)
- {
- Arg args[4];
- Cardinal count;
- Boolean argok;
-
- count = 0;
-
- // Load any class-defaulted resources for this object
-
- setDefaultResources(parent, _defaultDrcmapControlResources );
-
-
-
- // Create an unmanaged widget as the top of the widget hierarchy
-
- _baseWidget = _drcmapControl= XtVaCreateWidget ( _name,
- xmBulletinBoardWidgetClass,
- parent,
- XmNresizePolicy, XmRESIZE_NONE,
- NULL);
-
- // install a callback to guard against unexpected widget destruction
-
- installDestroyHandler();
-
-
- // Create widgets used in this component
- // All variables are data members of this class
-
- _listHeader = XtVaCreateManagedWidget ( "listHeader",
- xmLabelWidgetClass,
- _w,
- XmNalignment, XmALIGNMENT_BEGINNING,
- XmNheight, 17,
- NULL);
-
-
- _rgbDisp = XtVaCreateManagedWidget ( "rgbDisp",
- xmLabelWidgetClass,
- _w,
- NULL);
-
-
- _pickList1 = XtVaCreateManagedWidget ( "pickList1",
- xmPushButtonWidgetClass,
- _w,
- XmNborderWidth, 0,
- XmNheight, 30,
- NULL);
-
- XtAddCallback ( _pickList1,
- XmNarmCallback,
- &DrcmapControl::pickListCallback,
- (XtPointer) this );
-
-
- _rootList1 = XtVaCreateManagedWidget ( "rootList1",
- xmPushButtonWidgetClass,
- _w,
- XmNborderWidth, 0,
- XmNheight, 30,
- NULL);
-
- XtAddCallback ( _rootList1,
- XmNarmCallback,
- &DrcmapControl::rootListCallback,
- (XtPointer) this );
-
-
- _nextCmap1 = XtVaCreateManagedWidget ( "nextCmap1",
- xmPushButtonWidgetClass,
- _w,
- XmNrecomputeSize, False,
- NULL);
-
- XtAddCallback ( _nextCmap1,
- XmNactivateCallback,
- &DrcmapControl::nextCmapCallback,
- (XtPointer) this );
-
- XtAddCallback ( _nextCmap1,
- XmNarmCallback,
- &DrcmapControl::pushedBtnrCallback,
- (XtPointer) this );
-
- XtAddCallback ( _nextCmap1,
- XmNdisarmCallback,
- &DrcmapControl::normalBtnrCallback,
- (XtPointer) this );
-
-
- _prevCmap1 = XtVaCreateManagedWidget ( "prevCmap1",
- xmPushButtonWidgetClass,
- _w,
- NULL);
-
- XtAddCallback ( _prevCmap1,
- XmNactivateCallback,
- &DrcmapControl::prevCmapCallback,
- (XtPointer) this );
-
- XtAddCallback ( _prevCmap1,
- XmNarmCallback,
- &DrcmapControl::pushedBtnlCallback,
- (XtPointer) this );
-
- XtAddCallback ( _prevCmap1,
- XmNdisarmCallback,
- &DrcmapControl::normalBtnlCallback,
- (XtPointer) this );
-
-
- _scrolledWindow = XtVaCreateManagedWidget ( "scrolledWindow",
- xmScrolledWindowWidgetClass,
- _w,
- XmNscrollingPolicy, XmAPPLICATION_DEFINED,
- XmNscrollBarDisplayPolicy, XmSTATIC,
- NULL);
-
-
- _list1 = XtVaCreateManagedWidget ( "list1",
- xmListWidgetClass,
- _scrolledWindow,
- XmNlistSizePolicy, XmCONSTANT,
- XmNscrollBarDisplayPolicy, XmSTATIC,
- NULL);
-
- XtAddCallback ( _list1,
- XmNbrowseSelectionCallback,
- &DrcmapControl::pickCmapCallback,
- (XtPointer) this );
-
-
- _frame = XtVaCreateManagedWidget ( "frame",
- xmFrameWidgetClass,
- _w,
- XmNx, 24,
- XmNy, 24,
- XmNwidth, 258,
- XmNheight, 258,
- NULL);
-
-
- _drawwin = new DrawwinDerived( "drawwin",_frame);
- _drawwin->manage();
-
- }
-
- DrcmapControl::~DrcmapControl()
- {
- // Empty Destructor. Base class destroys widgets
- }
-
- const char * DrcmapControl::className() // classname
- {
- return ("DrcmapControl");
- }
-
- void DrcmapControl::nextCmapCallback (Widget w, XtPointer clientData, XtPointer callData)
- {
- DrcmapControl* obj = (DrcmapControl *) clientData;
-
- obj->nextCmap(w, callData);
- }
-
- void DrcmapControl::normalBtnlCallback (Widget w, XtPointer clientData, XtPointer callData)
- {
- DrcmapControl* obj = (DrcmapControl *) clientData;
-
- obj->normalBtnl(w, callData);
- }
-
- void DrcmapControl::normalBtnrCallback (Widget w, XtPointer clientData, XtPointer callData)
- {
- DrcmapControl* obj = (DrcmapControl *) clientData;
-
- obj->normalBtnr(w, callData);
- }
-
- void DrcmapControl::pickCmapCallback (Widget w, XtPointer clientData, XtPointer callData)
- {
- DrcmapControl* obj = (DrcmapControl *) clientData;
-
- obj->pickCmap(w, callData);
- }
-
- void DrcmapControl::pickListCallback (Widget w, XtPointer clientData, XtPointer callData)
- {
- DrcmapControl* obj = (DrcmapControl *) clientData;
-
- obj->pickList(w, callData);
- }
-
- void DrcmapControl::prevCmapCallback (Widget w, XtPointer clientData, XtPointer callData)
- {
- DrcmapControl* obj = (DrcmapControl *) clientData;
-
- obj->prevCmap(w, callData);
- }
-
- void DrcmapControl::pushedBtnlCallback (Widget w, XtPointer clientData, XtPointer callData)
- {
- DrcmapControl* obj = (DrcmapControl *) clientData;
-
- obj->pushedBtnl(w, callData);
- }
-
- void DrcmapControl::pushedBtnrCallback (Widget w, XtPointer clientData, XtPointer callData)
- {
- DrcmapControl* obj = (DrcmapControl *) clientData;
-
- obj->pushedBtnr(w, callData);
- }
-
- void DrcmapControl::rootListCallback (Widget w, XtPointer clientData, XtPointer callData)
- {
- DrcmapControl* obj = (DrcmapControl *) clientData;
-
- obj->rootList(w, callData);
- }
-
-
-
- void DrcmapControl::nextCmap(Widget, XtPointer)
- {
- // Empty virtual function. Called from nextCmapCallback.
- // Derived classes can override.
- }
-
- void DrcmapControl::normalBtnl(Widget, XtPointer)
- {
- // Empty virtual function. Called from normalBtnlCallback.
- // Derived classes can override.
- }
-
- void DrcmapControl::normalBtnr(Widget, XtPointer)
- {
- // Empty virtual function. Called from normalBtnrCallback.
- // Derived classes can override.
- }
-
- void DrcmapControl::pickCmap(Widget, XtPointer)
- {
- // Empty virtual function. Called from pickCmapCallback.
- // Derived classes can override.
- }
-
- void DrcmapControl::pickList(Widget, XtPointer)
- {
- // Empty virtual function. Called from pickListCallback.
- // Derived classes can override.
- }
-
- void DrcmapControl::prevCmap(Widget, XtPointer)
- {
- // Empty virtual function. Called from prevCmapCallback.
- // Derived classes can override.
- }
-
- void DrcmapControl::pushedBtnl(Widget, XtPointer)
- {
- // Empty virtual function. Called from pushedBtnlCallback.
- // Derived classes can override.
- }
-
- void DrcmapControl::pushedBtnr(Widget, XtPointer)
- {
- // Empty virtual function. Called from pushedBtnrCallback.
- // Derived classes can override.
- }
-
- void DrcmapControl::rootList(Widget, XtPointer)
- {
- // Empty virtual function. Called from rootListCallback.
- // Derived classes can override.
- }
-
-
-
-